<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="../css/reset.css" />
		<link rel="stylesheet" type="text/css" href="../css/head.css" />
		<link rel="stylesheet" type="text/css" href="../css/password17.css" />
		<link rel="stylesheet" type="text/css" href="" />
		<script src="../js/zepto.min.js" type="text/javascript" charset="utf-8"></script>
	</head>

	<body>
		<div class="head">
			<div class="head_leftDiv">

			</div>
			<h2>找回密码</h2>
			<div class="head_rightDiv"></div>
		</div>
		//
		<form action="" method="post" class="register">
			<input type="text" class="shouji" placeholder="所注册的手机号" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onafterpaste="this.value=this.value.replace(/[^\d]/g,'') " name="" value="" />

			<input type="text" class="yzm" placeholder="请输入验证码" onkeyup="this.value=this.value.replace(/[^\d]/g,'') " onafterpaste="this.value=this.value.replace(/[^\d]/g,'') " name="" value="" />

			<span onclick=checkPhone() class="huoqu">获取验证</span>

		</form>
		<span class="sub">登录</span>
		<div class="wangji">
			<a href="register16.html">返回登录</a>
		</div>

	</body>

	<script src="../js/dd.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		var t = 10;

		function checkPhone() {

			var phone = $('.shouji').val()
			if(phone.length == '0') {
				alert("请输入手机号");
			} else if(!(/^1[34578]\d{9}$/.test(phone))) {
				alert("手机号码有误，请重填");
				return false;
			} else {
				var timer = setInterval(function() {
					t--;
					$('.huoqu').text('再次获取(' + t + ')')
					if(t == 0) {
						t = 10;
						clearInterval(timer)
						$('.huoqu').text('再次获')
					}

				}, 1000)
			}
		}

		$('.sub').click(function() {
			if(!($('.yzm').val().length == 4)) {
				alert('验证码不正确')
			}
		})
	</script>

</html>